package priv.mill.bigdata.autompg;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.hadoop.io.Writable;

public class MyInfo implements Writable{

	/**
	 * 马力
	 */
	private Integer horsepower;
	
	/**
	 * 重量
	 */
	private Integer weight;
	
	@Override
	public void write(DataOutput out) throws IOException {
		out.writeInt(horsepower);
		out.writeInt(weight);
	}

	@Override
	public void readFields(DataInput in) throws IOException {
		horsepower = in.readInt();
		weight = in.readInt();
	}

	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}

	public Integer getHorsepower() {
		return horsepower;
	}

	public void setHorsepower(Integer horsepower) {
		this.horsepower = horsepower;
	}

	@Override
	public String toString() {
		return "[horsepower=" + horsepower + ", weight=" + weight + "]";
	}

}
